Skip to content

feat(bridge): the sandbox app and console, connected to the Xtradot Bank sandbox - #8

Merged
kenzycodex merged 9 commits into
mainfrom
feat/demo-history-import
Nov 11, 2026
Merged

kenzycodex merged 9 commits into
mainfrom
feat/demo-history-import

Conversation

@kenzycodex

@kenzycodex kenzycodex commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Why

The demo should run in the product's own sandbox app and console, not a separate page. The sandbox app works on Fable's simulated ledger; this connects it to the organizers' Xtradot Bank sandbox for one institution, so the judges see the real bank behind the screens they already know.

What changes

API

  • services/forge_bridge.py: for the institution in FORGE_BRIDGE_INSTITUTION, every transfer money moves on is also sent to the Xtradot sandbox from the customer's own account there. It runs off the request path, once per transfer, through the existing claim-then-send state machine, so a lost answer is only queried and never resent. Unknown banks and customers without a bank account are recorded as not sent, with the reason.
  • Hooks at the three places money moves in the sandbox: a pass (routers/shield.py), a verified flag (routers/transactions.py), and a released hold (agents/ghost/account.py). Holds and flags send nothing until then.
  • services/forge_seed.ensure_bank with services/forge_history.py: at startup, when forge-console is set, Xtradot Bank is set up the way a bank is onboarded. That means a sandbox institution, a console owner, and the bank's five customers with 60 days of past transfers to the sandbox's own beneficiaries, all through the console's import service. Customers start with real habits, and their saved recipients are accounts the bank accepts.

Web

  • /api/banks returns the sandbox's ten banks with their NIP codes, and /api/resolve-account uses the bank's own name enquiry, both only when FORGE_BRIDGE=1.
  • BankSettlement: the receipt and the transfer detail page show the bank's answer (status, fee, VAT, stamp duty, total debit to the kobo, reference, and the trail when an answer was lost). It renders nothing for banks that are not connected.

Deploy

  • The API gets FORGE_BRIDGE_INSTITUTION=xtradot and the console login from the forge-console secret; the site gets FORGE_BRIDGE=1. The runbook has the secret, the restarts, and a demo script.

Checked

  • 453 API tests pass (8 new for the bridge). Lint and typecheck clean. 28 web unit tests pass.
  • All 19 of the repo's browser tests pass, so the app is unchanged with the bridge off.
  • In a real browser, against a fake bank that behaves as the platform guide describes:
    • Signed in to the console, then in the sandbox app as Adaeze: ₦5,000 to a saved payee passed on her habits and the receipt showed Paid.
    • A new GTBank account was confirmed by the bank's name enquiry.
    • ₦15,000 to it passed, settled from pending to paid, and showed the fee, VAT and stamp duty.
    • ₦30,000 to a new UBA payee was flagged, verified with the PIN, and the transfer page showed Paid with ₦30,076.88 total debit.
    • Babatunde's ₦1,500,000 to a new payee was paused by Ghost.
    • An unknown account was refused by the bank.

Not checked

  • Not run against the real sandbox, which only answers from inside the cluster.
  • The flag-versus-hold line depends on the device and session the browser presents; amounts in the runbook's demo script are the ones that behaved as described in the local runs.

@kenzycodex
kenzycodex marked this pull request as ready for review November 11, 2026 08:04
@kenzycodex
kenzycodex merged commit d11c2f8 into main Nov 11, 2026
1 of 5 checks passed
@kenzycodex
kenzycodex deleted the feat/demo-history-import branch November 11, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant